// 出入库明细表关联了商品
const {DataTypes, db } = require("../db");
db.define('vMainInfo', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
iid:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
tenantId:{type: DataTypes.INTEGER,comment:''}, 
transType:{type: DataTypes.INTEGER,comment:''}, 
trans:{type: DataTypes.STRING(50),comment:''}, 
invId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
invName:{type: DataTypes.STRING(150),allowNull:false,comment:''}, 
locationId:{type: DataTypes.SMALLINT,allowNull:false,comment:''}, 
locationName:{type: DataTypes.STRING(100),allowNull:false,comment:''}, 
brandId:{type: DataTypes.INTEGER,comment:''}, 
brandName:{type: DataTypes.STRING(150),comment:''}, 
qty:{type: DataTypes.DECIMAL(20, 2),allowNull:false,comment:''}, 
price:{type: DataTypes.DECIMAL(20, 8),allowNull:false,comment:''}, 
deduction:{type: DataTypes.DECIMAL(18, 2),allowNull:false,comment:''}, 
amount:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
qtyReal:{type: DataTypes.DECIMAL(20, 2),comment:''}, 
amountReal:{type: DataTypes.DECIMAL(18, 2),comment:''}, 
printUnit:{type: DataTypes.STRING(50),allowNull:false,comment:''}, 
unit:{type: DataTypes.STRING(50),comment:''}, 
spec:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
calNum:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
unit1:{type: DataTypes.STRING(50),comment:''}, 
unit2:{type: DataTypes.STRING(50),allowNull:false,comment:''}, 
goodCatCode:{type: DataTypes.STRING(255),comment:''}, 
goodCatName:{type: DataTypes.STRING(255),comment:''}, 
goodCatId:{type: DataTypes.SMALLINT,comment:''}, 
barCode1:{type: DataTypes.STRING(60),comment:''}, 
send:{type: DataTypes.STRING(50),comment:''}, 
remark:{type: DataTypes.STRING(1000),comment:''}, 
ysId:{type: DataTypes.INTEGER,comment:''}, 
sendPrice:{type: DataTypes.DECIMAL(18, 2),comment:''}, 

}, {
    tableName: 'v_main_info',
    timestamps: false,
    comment: '出入库明细表关联了商品',
    
});